home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / util / misc / cookie21.lha / Cookie / README.First < prev    next >
Text File  |  1995-09-04  |  4KB  |  117 lines

  1.  
  2. This is the 'cookie' fortune cookie program, version 2.1.
  3.  
  4. Original Unix version by Karl Lehenbauer
  5.  
  6. Amiga version by Andreas M. Kirchwitz
  7.  
  8. Improved Amiga version by J÷rgen Grahn
  9.  
  10. J÷rgen Grahn
  11. Wetterlinsgatan 13e
  12. 521 34 Falk÷ping
  13. Sverige / Sweden / SuΦde
  14.  
  15.  
  16. I (J÷G) didn't write this program, or port it to the Amiga.  The other two
  17. guys did.  I enhanced it to v2.0 and v2.1.  This file is a third level of
  18. documentation which overrides the two other (README, README.AMIGA).
  19.  
  20.  
  21. Changes from cookie/cookhash 2.0 to
  22. cookie/cookhash 2.1 (1995-08-22):
  23.  
  24. o    Compiled with SAS/C 6.55.
  25.  
  26. o    Cookie looks, per default, for cookie and hash files as
  27.     "Data:Div/cookies.txt" and "Data:Div/cookies.hash".
  28.     Actually, this was in 2.0 as well, but not documented.
  29.     If you don't want that setup, you can, as always, give
  30.     cookie its command-line arguments, or use an alias.
  31.     There is no really good place in the standard Amiga setup
  32.     for data files like these. "S:" is a _bad_ place.
  33.  
  34. o    Randomly selecting a cookie is a delicate process.
  35.     You must treat the random numbers carefully; with only minor
  36.     differences in the state of your computer (mainly the
  37.     system clock), you must generate a different number each time
  38.     the program is invoked, and no cookies must be unreachable -
  39.     all must have a roughly equal chance of being selected.
  40.  
  41.     As mentioned below, 'cookie' used to select its output from
  42.     a _subset_ of the cookie file. Either seeding, ranging or the
  43.     randomizing process wasn't good enough. Therefore, I replaced the
  44.     pseudo-random number algorithms with R250, a PD algorithm
  45.     found on
  46.     wcarchive.cdrom.com
  47.     as
  48.     /pub/algorithms/c/r250/r250.[ch]
  49.  
  50.     That module also implements good ranging (just like
  51.     really_random() does, better that rand % n); as a result,
  52.     the output seems more variated. It should now happen
  53.     more rarely that you see the same cookie twice.
  54.  
  55. o    Due to the new random routines being ported from PCs,
  56.     the cookie files are currently limited to around
  57.     32,000 cookies.
  58.  
  59. o    I've added many new cookies/quotes to my cookie file.
  60.     It now has about 800 cookies, and is a mere 147kB large.
  61.  
  62.  
  63. Changes from Andreas' port of Karl's cookie/cookhash 1.1 to
  64. cookie/cookhash 2.0:
  65.  
  66. o    I haven't touched their documentation. This file is a third
  67.     level of documentation which overrides the two other
  68.     (README, README.AMIGA).
  69.  
  70. o    I always thought the randomness of the cookies was... inferior.
  71.     If I add cookies and rehash the file, a completely new set of
  72.     cookies will be displayed. Cookies seem to be selected from a
  73.     small subset of the database. I reverted to the original
  74.     ranged-random code, which seems to be better.
  75.  
  76. o    The format of the cookie file was a bit unclear. It used to be,
  77.     although not documented (note the closing "%%", it was needed
  78.     if you want the last cookie to be selectable):
  79.  
  80.     cookie
  81.     %%
  82.     cookie
  83.     %%
  84.     ...                   O L D   F O R M A T
  85.     %%
  86.     cookie
  87.     %%
  88.  
  89.     To this, I added the possibility of comments on the line
  90.     after the "%%". Then I decided to change 'cookhash' again -
  91.     that's where most of the parsing happens - to use flex rules.
  92.     I could then make the format even better. You should now view
  93.     the '%%' rows as comments introducing the cookie. An example:
  94.  
  95.     %% 
  96.     %% This cookie is really cool.
  97.     %%
  98.     - Huh-huh. Huh-huh-huh.
  99.     - Heh-heh hehehhehe-heeeeeeeiiiiiiaaaaa!
  100.         -Beavis & Butt-head
  101.     %%
  102.     Hi, my name is Lolita, an' this here is Tanqueray.  Since we're all about
  103.     to die, we were wondering if you'd like to be our last boyfriends on earth?
  104.         -Beavis & Butt-head: Tornado
  105.     %% Yet another short cookie:
  106.     core dumped: your fault
  107.     %% the last cookie:
  108.     I've seen the future baby - it is murder
  109.         Leonard Cohen
  110.  
  111.     Thus: '%%' _before_, not after each cookie!
  112.  
  113. o    Due to the changed format, the 'onecookie' utility may or may not
  114.     work. I won't fix that.
  115.  
  116. - J÷rgen 1995-04-20, 1995-08-22
  117.